
public class ChinaRise {
	
	private static int[][] array = {
							{0,1,2,3,4},  
				            {1,2,3,4,5},  
				            {2,3,4,5,6},  
				            {3,4,5,6,7}}; 
	private static int[] path = new int[8];

	/**
	 * @param args
	 */
	public static void main(String[] args) {

	}
	
	public static void visit() {
		int curIndex = 0; 
		int curColomn = 0;
		int curRow = 0;
		while (true) {
			path[curIndex] = array[curRow][curColomn];
			while(array[curRow][++curColomn] == path[curIndex] + 1 && curColomn < 5) {
				curIndex ++;
			}
			if (curIndex == 0) {
				break;
			}
		}
	}
	
	public static void print() {
		
	}

}
